<?php


namespace app\admin\controller;
use think\Db;
use think\Request;
use think\Controller;
class Exhonor extends ApiCommon
{
    public function ExhonorWrite()
    {
        $newsModel=model('Exhonor');
        $param=$this->param;
        $data=$newsModel->WriteExhonor($param);
        if(!$data)
        {
            return resultArray(['error'=>'添加数据失败']);
        }
        return resultArray(['data'=>'添加数据成功']);
    }   

    public function ExhonorList()
    {
        $newsModel=model('Exhonor');
        $param=$this->param;
        $data=$newsModel->ListExhonor($param);
        return resultArray(['data'=> $data]);
    }   
    public function ExhonorRevise()
    {
        $newsModel=model('Exhonor');
        $param=$this->param;
        $data=$newsModel->ReviseExhonor($param);
        if(!$data)
        {
            return resultArray(['error'=>'修改数据失败']);
        }
        return resultArray(['data'=>'修改数据成功']);
    }
     public function ExhonorDelete()
    {
        $newsModel=model('Exhonor');
        $param=$this->param;
        $data=$newsModel->DeleteExhonor($param);
        if(!$data)
        {
            return resultArray(['error'=>'删除数据失败']);
        }
        return resultArray(['data'=>'删除数据成功']);
    }
}